agents.anac.y2010.Southampton
Class SouthamptonAgent

java.lang.Object
  extended by negotiator.Agent
      extended by agents.anac.y2010.Southampton.SouthamptonAgent
Direct Known Subclasses:
IAMcrazyHaggler, SimilarityAgent

public abstract class SouthamptonAgent
extends Agent

Author:
Colin Williams

Field Summary
protected  double acceptMultiplier
           
protected  BidSpace bidSpace
          Our BidSpace.
protected static double MAXIMUM_ASPIRATION
          Our maximum aspiration level.
protected  Action myLastAction
          My previous action.
protected  Bid myLastBid
          My previous bid.
protected  java.util.ArrayList<Bid> myPreviousBids
          A list of our previous bids.
protected  java.util.ArrayList<Bid> opponentBids
          The bids made by the opponent.
protected  boolean opponentIsHardHead
           
protected  OpponentModel opponentModel
          Our model of the opponent.
protected  Bid opponentPreviousBid
          The opponent's previous bid.
 
Fields inherited from class negotiator.Agent
fNegotiation, parametervalues, sessionNr, sessionsTotal, startTime, strategyParameters, timeline, totalTime, utilitySpace
 
Constructor Summary
SouthamptonAgent()
           
 
Method Summary
 Action chooseAction()
          this function is called after ReceiveMessage, with an Offer-action.
protected  void finalize()
           
 int getAgentNo()
          Get the number of the agent.
protected  Bid getRandomBidInRange(double lowerBound, double upperBound)
          Get a random bid in a given utility range.
static java.lang.String getVersion()
          Gets the version number.
 void init()
          This method is called by the protocol every time before starting a new session after the internalInit method is called.
 void log(java.lang.String message)
          Output a message, but only if debugging is turned on.
protected abstract  Bid proposeInitialBid()
          Propose the initial bid.
protected abstract  Bid proposeNextBid(Bid opponentBid)
          Propose the next bid.
 void ReceiveMessage(Action opponentAction)
          informs you which action the opponent did
 
Methods inherited from class negotiator.Agent
endSession, getAgentID, getName, getParameterValues, getSessionNumber, getSessionsTotal, getStrategyParameters, getUniqueIdentifier, getUtility, internalInit, isUIAgent, loadSessionData, parseStrategyParameters, restartDataObjectsFolder, saveSessionData, setAgentID, setName, sleep
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAXIMUM_ASPIRATION

protected static double MAXIMUM_ASPIRATION
Our maximum aspiration level.


bidSpace

protected BidSpace bidSpace
Our BidSpace.


myLastAction

protected Action myLastAction
My previous action.


myLastBid

protected Bid myLastBid
My previous bid.


myPreviousBids

protected java.util.ArrayList<Bid> myPreviousBids
A list of our previous bids.


opponentBids

protected java.util.ArrayList<Bid> opponentBids
The bids made by the opponent.


opponentModel

protected OpponentModel opponentModel
Our model of the opponent.


opponentPreviousBid

protected Bid opponentPreviousBid
The opponent's previous bid.


acceptMultiplier

protected final double acceptMultiplier
See Also:
Constant Field Values

opponentIsHardHead

protected boolean opponentIsHardHead
Constructor Detail

SouthamptonAgent

public SouthamptonAgent()
Method Detail

getVersion

public static java.lang.String getVersion()
Gets the version number.

Returns:
the version number.

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

chooseAction

public final Action chooseAction()
Description copied from class: Agent
this function is called after ReceiveMessage, with an Offer-action.

Specified by:
chooseAction in class Agent
Returns:
(should return) the bid-action the agent wants to make.

getAgentNo

public int getAgentNo()
Get the number of the agent.

Returns:
the number of the agent.

getRandomBidInRange

protected Bid getRandomBidInRange(double lowerBound,
                                  double upperBound)
                           throws java.lang.Exception
Get a random bid in a given utility range.

Parameters:
lowerBound - The lower bound on utility.
upperBound - The upper bound on utility.
Returns:
a random bid in a given utility range.
Throws:
java.lang.Exception

init

public void init()
Description copied from class: Agent
This method is called by the protocol every time before starting a new session after the internalInit method is called. User can override this method.

Overrides:
init in class Agent

log

public final void log(java.lang.String message)
Output a message, but only if debugging is turned on.

Parameters:
message - The message to output.

proposeInitialBid

protected abstract Bid proposeInitialBid()
                                  throws java.lang.Exception
Propose the initial bid.

Returns:
The action to be bid.
Throws:
java.lang.Exception

proposeNextBid

protected abstract Bid proposeNextBid(Bid opponentBid)
                               throws java.lang.Exception
Propose the next bid.

Parameters:
opponentBid - The bid that has just been made by the opponent.
Returns:
The action to be bid.
Throws:
java.lang.Exception

ReceiveMessage

public final void ReceiveMessage(Action opponentAction)
Description copied from class: Agent
informs you which action the opponent did

Overrides:
ReceiveMessage in class Agent